Skip to content

Enhance Ember project detection#70

Open
evoactivity wants to merge 2 commits intomasterfrom
fix/pnpm-monorepo-detection
Open

Enhance Ember project detection#70
evoactivity wants to merge 2 commits intomasterfrom
fix/pnpm-monorepo-detection

Conversation

@evoactivity
Copy link
Copy Markdown
Member

@evoactivity evoactivity commented Apr 18, 2026

This adds more aggressive ember project detection methods.

I often open a pnpm monorepo package as my workspace which means workspace.findFiles will not match files because the node_modules symlinks point outside the workspace root.

This uses 5 methods to detect an ember project starting with the cheapest

  1. Force enable
  2. Look for ember-cli-build.* file
  3. Read dependencies of workspace root package.json
  4. Use node resolver to find files
  5. Manual walk through node_modules

Tested on my project and it works.

@evoactivity evoactivity requested a review from lifeart April 18, 2026 10:43
Comment thread src/workspace-utils.ts Outdated
Comment thread src/workspace-utils.ts Outdated
Comment thread src/workspace-utils.ts Outdated
Copy link
Copy Markdown
Contributor

@lifeart lifeart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few additional observations beyond the earlier thread. Nothing blocking; mainly correctness/UX polish.

One meta point: this extension declares "browser": "./dist/web/client/browserClientMain" in package.json, so web-worker compatibility (raised earlier on createRequire) is a live concern, not hypothetical.

Also — no tests were added. The tiered detection has several non-obvious branches (resolver path, walk cap, monorepo-root detection, the step-counter logic below); a small table-driven test over a tmp fixture tree would make this much safer to evolve.

Comment thread src/workspace-utils.ts Outdated
Comment thread src/workspace-utils.ts
Comment thread src/workspace-utils.ts Outdated
Comment thread package.json
Comment thread package.json
@evoactivity evoactivity force-pushed the fix/pnpm-monorepo-detection branch from ccb1bd2 to d5867d7 Compare April 23, 2026 17:01
@evoactivity
Copy link
Copy Markdown
Member Author

I've addressed the comments.

Regarding tests, there are currently no tests setup, I have something that does run tests but I'm not particularly happy with it.

I want to add a full test suite, not just for this bit of work. If we can get this merged and put out I'll work on modernising everything here and writing a test suite.

@evoactivity evoactivity requested a review from lifeart April 23, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants